summaryrefslogtreecommitdiff
path: root/app/[lng]
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-12-04 11:17:15 +0900
committerjoonhoekim <26rote@gmail.com>2025-12-04 11:17:15 +0900
commit0f3954bf57e65caef7b7dd14ea5fccb63fdb2bef (patch)
tree5d491a156929de5f5693eb75902e52ce0ae5a1ce /app/[lng]
parent64981be6831bac705a44b5753f07e4a0654bc532 (diff)
(김준회) 권한관리 환경변수로 제어: 개발 간 불편 줄이기 위함
Diffstat (limited to 'app/[lng]')
-rw-r--r--app/[lng]/evcp/(evcp)/layout.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/[lng]/evcp/(evcp)/layout.tsx b/app/[lng]/evcp/(evcp)/layout.tsx
index 7fe7f3e7..c5e75a4c 100644
--- a/app/[lng]/evcp/(evcp)/layout.tsx
+++ b/app/[lng]/evcp/(evcp)/layout.tsx
@@ -12,8 +12,11 @@ export default async function EvcpLayout({ children }: { children: ReactNode })
let isAuthorized = true;
let authMessage = "";
- // Only check permission if user is logged in
- if (session?.user?.id) {
+ // Skip permission check if environment variable is set
+ const skipPermissionCheck = process.env.SKIP_ORACLE_PERMISSION_CHECK === 'true';
+
+ // Only check permission if user is logged in and check is not skipped
+ if (session?.user?.id && !skipPermissionCheck) {
try {
const result = await verifyNonsapPermission(
parseInt(session.user.id),
@@ -34,7 +37,9 @@ export default async function EvcpLayout({ children }: { children: ReactNode })
<div className="relative flex min-h-svh flex-col bg-background">
{/* <div className="relative flex min-h-svh flex-col bg-slate-100 "> */}
<Header />
- <PermissionChecker authorized={isAuthorized} message={authMessage} />
+ {!skipPermissionCheck && (
+ <PermissionChecker authorized={isAuthorized} message={authMessage} />
+ )}
<main className="flex flex-1 flex-col">
<div className='container-wrapper'>
{children}